
using UnityEngine;
public class GameScr : CScreen{
	
	public static Bee Bee_Player;
	public static int gW, gH, gW2, gssw, gssh, gH34, gW3, gH3, gH23, gW23, gH2, csPadMaxH, cmdBarH, gW34, gW6, gH6;
	// camera 
	public static int cmx, cmy, cmdx, cmdy, cmvx, cmvy, cmtoX, cmtoY, cmxLim, cmyLim, gssx, gssy, gssxe, gssye;
	
	int dem =0;
	
	public Camera camera;
	public Map map;
    public int limDisx, dxCam;
	
	public GameScr(){
        //dxCam = 40;
     
        w = Screen.width;
        h = Screen.height;
		Bee_Player = new Bee();
       
	    dxCam = Screen.width - Bee_Player.x;
		camera = new Camera();
		map = new Map();

        
        //Bee_Player.loadImage();
	
		//custus_enime = new Castus();
		//custus_enime.loadImage();
		//creatCustus();
//		for(int i = 0; i < cutusEnime.size(); i++){
//			((Castus) cutusEnime.elementAt(i)).loadImage();
//		}
		//cutusEnime = new Vector();
	}

    public void updateCam()
    {
        
        if (dxCam > 0)
            dxCam--;
        if (dxCam < 0)
            dxCam++;
    }

	public override void update(){
        //limDisx = Bee_Player.xBalloon + dxCam;
        camera.update(Bee_Player.x, Bee_Player.y);
		map.update();
        Bee_Player.update();
	}

	static int shaking, count = 0;

	public override void paint(mGraphics g){
     
		g.setColor(0);
		g.fillRect(0, 0, w, h);
        //camera.translate(g);
		map.paint(g);
		Bee_Player.paint(g);
	}
}
